PATH 
Mac OS 8 and 9 Developer Documentation > Text and Other International Services > Apple Type Services for Unicode Imaging (ATSUI) > Apple Type Services for Unicode Imaging Reference

     

ATSUTextInserted

Indicates the location in physical memory of inserted text.

OSStatus ATSUTextInserted (
                     ATSUTextLayout iTextLayout,
                     UniCharArrayOffset iInsertionLocation,
                     UniCharCount iInsertionLength);
iTextLayout
A reference of type ATSUTextLayout. Pass a reference to an initialized text layout object. You cannot pass NULL for this parameter.

iInsertionLocation
A value of type UniCharArrayOffset. Pass the edge offset corresponding to the beginning of the inserted text. You may pass a value outside the range of text being operated on if the insertion occurs outside the range. To indicate the beginning of the text buffer, pass the constant kATSUFromTextBeginning, described in Text Offset Constant. If the offset is outside the text buffer, ATSUTextInserted returns the result code kATSUInvalidTextRangeErr.

iInsertionLength
A value of type UniCharCount. Pass the length of the inserted text. To indicate the end of the text buffer, pass the constant kATSUToTextEnd, described in Text Length Constant. To indicate the entire text buffer, pass kATSUToTextEnd in this parameter and the constant kATSUFromTextBeginning in the iInsertionLocation parameter. If the range is outside the text buffer, ATSUTextInserted returns the result code kATSUInvalidTextRangeErr.

function result
A result code. See Result Codes.
DISCUSSION
The ATSUTextInserted function extends the style run containing the insertion point and the total length of the text range by the amount of the text insertion. If the insertion point is between two style runs, the first style run is extended to include the new text. ATSUTextInserted then updates drawing caches.

ATSUTextInserted does not insert style runs or line breaks; if you wish to do so, call the functions ATSUSetRunStyle and ATSUSetSoftLineBreak, respectively.

ATSUTextInserted does not change the memory location or the edge offset of the text. It shifts the text after the inserted text by the appropriate offset (iInsertionLocation +iInsertionLength).

You are responsible for making sure that the corresponding text is inserted into the text buffer.

VERSION NOTES
Available beginning with ATSUI 1.0.


© 2000 Apple Computer, Inc. – (Last Updated 25 Jan 00)